import request from '@/utils/request'

const PATH = '/sys/post'

export function pagePostREQ(params) {
  return request({
    url: PATH,
    method: 'get',
    params
  })
}

export function createPostREQ(params) {
  return request({
    url: PATH,
    method: 'post',
    params
  })
}
export function getPostByIdREQ(id) {
  return request({
    url: `${PATH}/${id}`,
    method: 'GET'
  })
}

export function updatePostREQ(params) {
  return request({
    url: PATH,
    method: 'put',
    params
  })
}

export function deletePostREQ(id) {
  return request({
    url: `${PATH}/${id}`,
    method: 'delete'
  })
}

export function findPostREQ(id) {
  return request({
    url: `${PATH}/find`,
    method: 'GET'
  })
}
